﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ICarPool.BLL
{
    /// <summary>
    /// This structure contains the order attributes
    /// </summary>
    [Serializable]
    public struct SqlOrder
    {
        private string orderName;
        private string orderDirection;

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="name">The field to sort</param>
        /// <param name="direction">The direction to sort</param>
        public SqlOrder(string name, string direction)
        {
            this.orderName = name.ToUpper();
            this.orderDirection = direction;
        }

        /// <summary>
        /// The field to sort
        /// </summary>
        public string Name
        {
            get
            {
                return this.orderName;
            }
            set
            {
                this.orderName = value.ToUpper();
            }
        }

        /// <summary>
        /// The direction to sort
        /// </summary>
        public string Direction
        {
            get
            {
                return this.orderDirection;
            }
            set
            {
                this.orderDirection = value;
            }
        }
    }
}
